#!/usr/bin/python
# -*- coding: UTF-8 -*-

import re
import sys
import os
import time
import threading
import datetime

os.system("sudo service apache2 restart > /dev/null 2>&1")
starttime = datetime.datetime.now()
os.system("ab -n 100000 -c 500 http://127.0.0.1/index.html")
endtime = datetime.datetime.now()
print "Httpd:" + str((endtime - starttime).total_seconds())
os.system("sudo service apache2 restart > /dev/null 2>&1")
